/*
 * Created on 2005-9-21
 *
 * To change the template for this generated file go to
 * Window&gt;Preferences&gt;Java&gt;Code Generation&gt;Code and Comments
 */
package com.bytime.common;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;

import org.apache.struts.action.*;

import com.bytime.uams.action.common.EossMacroDefine;
/**
 * @author sz
 *
 * To change the template for this generated type comment go to
 * Window&gt;Preferences&gt;Java&gt;Code Generation&gt;Code and Comments
 */
public class IndexAction extends Action {

	public ActionForward execute(
		ActionMapping actionMapping,
		ActionForm actionForm,
		HttpServletRequest httpServletRequest,
		HttpServletResponse httpServletResponse)
		throws Exception {
        
        String strMenuCode = httpServletRequest.getParameter("menucode");
        
        HttpSession objSession = httpServletRequest.getSession();
        
        objSession.setAttribute(EossMacroDefine.SESSION_MENUCODE,strMenuCode);
        
        if (httpServletRequest.getSession().getAttribute("login") == null)
        {
            return actionMapping.findForward("login");
        }

        
		return (actionMapping.findForward(EossMacroDefine.ActionDefine.STR_VIEW_KEY));
	}
}
